package com.windea.study.kotlin.jvm.crypt.extensions

import java.util.*

//fun Char.toASCII() = this.toInt()
//
//fun String.toASCII() = this.toCharArray().map { it.toInt() }.joinToString(" ")
//
//fun String.toASCIIList() = this.toCharArray().map { it.toInt() }

fun ByteArray.encodeBase64(): ByteArray = Base64.getEncoder().encode(this)

//fun ByteArray.encodeBase64String(): String = Base64.getEncoder().encodeToString(this)

fun ByteArray.decodeBase64(): ByteArray = Base64.getDecoder().decode(this)

//fun String.decodeBase64String(): ByteArray = Base64.getDecoder().decode(this)
